// 这个文件专门封装跟接口有关的接口
import request from '@/utils/request'
import { getToken } from '@/utils/storage'

// 封装一个获取文章列表的接口
export const interviewListAPI = (params) => {
  return request({
    url: '/h5/interview/query',
    params,
    headers: {
      Authorization: `Bearer ${getToken()}`
    }
  })
}
// 封装一个获取文章详情的接口
export const detailAPI = (params) => {
  return request({
    url: '/h5/interview/show',
    params
  })
}
// 封装点赞或者收藏的接口
export const zanAPI = (data) => {
  return request({
    url: '/h5/interview/opt',
    method: 'post',
    data
  })
}
// 封装一个点赞或者收藏列标接口
export const getOptListAPI = (params) => {
  return request({
    url: '/h5/interview/opt/list',
    params
  })
}
